<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let str = "";
      for (let i = 9; i >= 1; i--) {
        for (let j = 9; j >= 1; j--) {
          if (j > i) {
            str = str + `${" "} ${" "} ${"  "} `;
          } else {
            str = str + `${j}x${i}=${j * i < 10 ? j * i + " " : j * i} `;
          }
        }
        str = str + "\n";
      }
      console.log(str);
    </script>
  </body>
</html>
